#include <iostream>
#include <string>
#include "RBTree.h"
using namespace std;
int main(){
    RBTree<int,std::string> rbt;
    rbt.insert({50,"50"});
    rbt.insert({80,"80"});
    rbt.insert({40,"40"});
    rbt.insert({70,"70"});
    rbt.insert({10,"10"});
    rbt.insert({5,"5"});
    rbt.inOrder();
    cout<<endl;
    rbt.printRoot();
    cout<<endl;

    cout << "Deleting node with key 70:" << endl;
    rbt.remove(70);
    rbt.inOrder();
    cout<<endl;

    cout << "Deleting node with key 50:" << endl;
    rbt.remove(50);
    rbt.inOrder();
    cout<<endl;

    cout << "Adding node with key 70:" << endl;
    rbt.insert({70,"70"});
    rbt.inOrder();
    cout<<endl;
    cout << "Adding node with key 70:" << endl;
    rbt.insert({7,"7"});
    rbt.inOrder();
    cout<<endl;
    cout << "Adding node with key 70:" << endl;
    rbt.insert({6,"6"});
    rbt.inOrder();
    cout<<endl;

    cout << "Deleting node with key 50:" << endl;
    rbt.remove(6);
    rbt.inOrder();
    cout<<endl;

    return 0;

}